package com.Tjise.xuanze;

public class javaxuanze {
    public static void main(String[] args) {
        // write your code here
        test1();
        test2();
    }

    /**
     * if else if else条件判断
     */
    public static void test1() {
        int score = 90;
        //进行分数判断
        if (score >= 90) {
            System.out.println("优秀");
        } else if (score >= 80) {
            System.out.println("良好");
        } else if (score >= 70) {
            System.out.println("中等");
        } else if (score >= 60) {
            System.out.println("及格");
        } else {
            System.out.println("不及格");
        }
        //换行操作
        System.out.println("==========================");
    }

    /**
     * switch case 多条件选择
     */
    public static void test2() {
        int score = 80;
        switch (score / 10) {
            case 9:
                System.out.println("优秀");
                break;
            case 8:
                System.out.println("良好");
                break;
            case 7:
                System.out.println("中等");
                break;
            case 6:
                System.out.println("及格");
                break;
            default:
                System.out.println("不及格");
        }
        System.out.println("==========================");
    }
}
